package com.kgc.scd.controller;

import com.kgc.scd.bean.HotKey;
import com.kgc.scd.contant.HotKeyConstant;
import com.kgc.scd.producer.HotKeyProducer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created On : 2022/6/14.
 * <p>
 * Author     : hi
 * <p>
 * Description: HotKeyController
 */
@RestController
public class HotKeyController {
    @Autowired
    private HotKeyProducer hotKeyProducer;

    @PostMapping("/addHotKey")
    public String addHotKey(@RequestBody HotKey hotKey){
        hotKeyProducer.sendP2P(HotKeyConstant.HOT_KEY_ADD_P2P,hotKey);
        return "修改成功";
    }
}
